<?php
# PMB Online
# Aplikasi PMB Online untuk Pendaftaran Calon Mahasiswa di PT/PTS Indonesia
# 
# version 1.0
# class set_lulus
# file
# created Jan 24, 2013 6:52:21 PM
# 
# (c)2012, arif.laksito@gmail.com

if (!defined('BASEPATH'))
    exit('No direct script access allowed');
?>
<h3>Set Kelulusan</h3>
<ul class="breadcrumb">
    <li>PMB Online <span class="divider">/</span></li>   
    <li>Data Pendaftar <span class="divider">/</span></li>
    <li>Set Kelulusan</li>
</ul>

<script type="text/javascript">
    $(document).ready(function(){
        <?php foreach ($mhs as $h):?>
        $('#s<?php echo $h['nodaf']?>').change(function(){				            
            $.get('<?php echo base_url()?>apps/lulus/<?php echo $h['nodaf']?>/'+$('#s<?php echo $h['nodaf']?>').val());
            alert('Set Kelulusan Calon Mahasiswa Nodaf <?php echo $h['nodaf']?> Berhasil');
            location.reload();
            
        });	
        <?php endforeach?>
    });
</script>

<table id="example" cellpadding="0" cellspacing="0" border="0" class="table table-striped table-bordered">
    <thead>
        <tr>            
            <th>No.Daftar</th>            
            <th>Gelombang/<br />Tgl.Daftar</th>
            <th>Nama Lengkap</th>
            <th>Rata-rata<br />NEM/IPK</th>
            <th>Pilihan Jurusan</th>            
            <th>Set Jurusan Lulus</th>
        </tr>
    </thead>
    <tbody>
        <?php foreach ($mhs as $m): ?>
            <tr>            
                <td>
                    <a href="<?php echo base_url('apps/cetak/' . $m['nodaf']) ?>" target="_blank" >
                        <?php echo $m['nodaf'] ?>
                    </a>
                </td>            
                <td>
                    <?php echo $m['nama_gel'] ?><br />
                    <?php echo mdate('%d %M %Y', mysql_to_unix($m['tgl_daftar'])) ?>
                </td>            
                <td><?php echo $m['nama_lengkap'] ?></td>
                <td><div class="irt"><?php echo number_format($m['nem'], 2) ?></div></td>
                <td>
                    <?php $jur = explode(',', $m['pilihan_jur']) ?>
                    <?php foreach ($jur as $j): ?>
                        <?php if ($j != '') echo $j . '<br />' ?>
                    <?php endforeach; ?>
                </td>                
                <td>
                    Jenis Pendaftaran: 
                    <?php $sts = array('Reguler', 'Pindahan', 'CSR') ?>
                    <?php echo $sts[$m['status_daftar']] ?><br />                                        

                    <select name="jur" id="s<?php echo $m['nodaf']?>">
                        <option value="">Pilih Jurusan Lulus..</option>
                        <?php foreach ($jurs as $d): ?>            
                            <option value="<?php echo $d['id_jurusan'] ?>"> 
                                <?php echo $d['jenjang'] . '-' . $d['nama_jurusan'] ?>
                            </option>                        
                        <?php endforeach ?>     
                        <option value="0">Tidak Lulus</option>        
                    </select> 
                </td>
            </tr>
        <?php endforeach ?>
    </tbody>
</table>        
<br /><br />
<p>
    *) Pilih Jurus untuk meluluskan calon siswa<br />    
    *) Klik nomer daftar untuk mencetak kartu pendaftaran
</p>
